<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('选择定额工日单价')" />
</head>
<body class="gray-bg">
     <input type="hidden" id="rowIds">
     <div class="container-div">
		<div class="row">
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table"></table>
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var prefix = ctx + "basic/price";
		var types = [[${@dict.getType('daily_unit_price_type')}]];
        $(function() {
            var options = {
				url: prefix + "/detail/list?type=1&unitPriceId=[[${id}]]",
		        showSearch: false,
		        showRefresh: false,
		        showToggle: false,
		        showColumns: false,
				columns: [{
					field: 'selectItem',
					radio: true
				},
					{
						field: 'id',
						title: 'id',
						visible: false
					},
					{
						field: 'categoryName',
						title: '分类名称'
					},
					{
						field: 'maxPrice',
						title: '最大单价'
					},
					{
						field: 'minPrice',
						title: '最小单价'
					},
					{
						field: 'avgPrice',
						title: '平均单价(元/天)'
					}]
            };
            $.table.init(options);
        });

		/* 添加用户-选择用户-提交(回调形式-父页面调用子页面) */
		function getSelections() {
			var avgPrice = $.table.selectColumns("avgPrice")[0]
			return {"price":avgPrice};
		}

    </script>
</body>
</html>